package com.ethink.order.facade.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.TocSaleAfterImportLogFacade;
import com.ethink.order.api.info.TocSaleAfterImportLogInfo;
import com.ethink.order.api.request.TocSaleAfterImportLogAddRequest;
import com.ethink.order.api.request.TocSaleAfterImportLogQueryRequest;
import com.ethink.order.api.request.TocSaleAfterImportLogUpdateRequest;
import com.ethink.order.api.request.UpdateStatusBaseRequest;
import com.ethink.order.api.response.*;
import com.ethink.order.manager.TocSaleAfterImportManager;
import com.ethink.order.service.TocSaleAfterImportLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.PrimitiveIterator;

/**
 * TOC售后导入日志 Facade接口实现
 *
 * @author default
 * @date 2023-01-10
 */
@RestController
@Slf4j
@RequestMapping("order-service/facade/v1/tocSaleAfterImportLog")
public class TocSaleAfterImportLogFacadeImpl implements TocSaleAfterImportLogFacade {

    @Autowired
    private TocSaleAfterImportLogService tocSaleAfterImportLogService;

    @Autowired
    private TocSaleAfterImportManager tocSaleAfterImportManager;

    @Override
    public Page<TocSaleAfterImportLogInfo> queryTocSaleAfterImportLog(TocSaleAfterImportLogQueryRequest request) {
        return tocSaleAfterImportLogService.queryTocSaleAfterImportLog(request);
    }

    @Override
    public TocSaleAfterImportLogGetResponse getTocSaleAfterImportLogById(Long id) {
        return tocSaleAfterImportLogService.getTocSaleAfterImportLogById(id);
    }

    @Override
    public List<TocSaleAfterImportLogInfo> listTocSaleAfterImportLog(TocSaleAfterImportLogQueryRequest request) {
        return tocSaleAfterImportLogService.listTocSaleAfterImportLog(request);
    }

    @Override
    public TocSaleAfterImportLogAddResponse addTocSaleAfterImportLog(TocSaleAfterImportLogAddRequest request) {
        return tocSaleAfterImportLogService.addTocSaleAfterImportLog(request);
    }

    @Override
    public TocSaleAfterImportLogUpdateResponse updateTocSaleAfterImportLog(TocSaleAfterImportLogUpdateRequest request) {
        return tocSaleAfterImportLogService.updateTocSaleAfterImportLog(request);
    }

    @Override
    public TocSaleAfterImportLogDeleteResponse deleteTocSaleAfterImportLog(Long tocSaleAfterImportLogId) {
        return tocSaleAfterImportLogService.deleteTocSaleAfterImportLog(tocSaleAfterImportLogId);
    }

    @Override
    public void updateStatus(UpdateStatusBaseRequest updateStatusBaseRequest) {
        tocSaleAfterImportLogService.updateStatus(updateStatusBaseRequest);
    }

    @Override
    public List<TocSaleAfterImportResponse> settleOrder(Long id) {
        return tocSaleAfterImportManager.settleOrder(id);
    }

}